package com.springboot.cli;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.util.Date;

/**
 * @author ding
 */
@SpringBootApplication
@Slf4j
public class WebApplication {

    public static void main(String[] args) {
        SpringApplication.run(WebApplication.class, args);

        save(args);
    }

    private static void save(String[] args) {
        StringBuffer s = new StringBuffer();
        if (args != null && args.length != 0) {
            for (int i = 0; i < args.length; i++) {
                if (args[i] != null &&  !"".equals(args[i])) {
                    s.append(args[i]);
                    s.append(" ");
                }
            }
        }
        s.append(new Date().toString());
        System.setProperty("startInfo", s.toString());
    }

}
